﻿using System.Collections.Generic;
using Microsoft.Kinect;

namespace SVU.Model
{
    public class PersonBioID
    {
        public static Dictionary<JointType, string> SegmentNameMapping = new Dictionary<JointType, string>();

        static PersonBioID()
        {
            SegmentNameMapping.Add(JointType.WristLeft, "L forearm");
            SegmentNameMapping.Add(JointType.WristRight, "R forearm");
            SegmentNameMapping.Add(JointType.ElbowLeft, "L upper arm");
            SegmentNameMapping.Add(JointType.ElbowRight, "R upper arm");
            SegmentNameMapping.Add(JointType.AnkleLeft, "L shin");
            SegmentNameMapping.Add(JointType.AnkleRight, "R shin");
            SegmentNameMapping.Add(JointType.KneeLeft, "L thigh");
            SegmentNameMapping.Add(JointType.KneeRight, "R thigh");
            SegmentNameMapping.Add(JointType.ShoulderLeft, "shoulder width");
        }
        
        /// <summary>
        /// Initialize
        /// </summary>
        public PersonBioID()
        {
            foreach (var jointType in SegmentNameMapping.Keys)
            {
                Segments.Add(jointType, new SegmentForId());
            }
        }

        public Dictionary<JointType, SegmentForId> Segments = new Dictionary<JointType, SegmentForId>();
        public int Id { get; set; }
        public string PersonName { get; set; }
        public double TorsoToHeadDistance { get; set; }

        public double LForeArm { get; set; }
        public double RForeArm { get; set; }
        public double LUpperArm { get; set; }
        public double RUpperArm { get; set; }
        public double LShin { get; set; }
        public double RShin { get; set; }
        public double LThigh { get; set; }
        public double RThigh { get; set; }
        public double ShoulderWidth { get; set; }
    }

    public class SegmentForId
    {
        public double SegmentLength { get; set; }
        //public double DiffFromKnown { get; set; }
        //public double ClosestKnownLength {get;set;}
    }
}